Repository navigation
refactor(issue-fix): consolidate maintainer-correction admission and slim pr_lifecycle - #8897
Conversation
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
76e1c3b to
7fbe18f
Compare
7fbe18f to
32a8a47
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google (self_reported)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
已针对 PR #8897 exact head 32a8a47d7f4f9d72d3e515e3946b15aca74cb513 完成完整代码审查、静态/棘轮验证、本地真实边界测试及远端 CI 失败归因(审查结论:APPROVE,无 P0/P1/P2 阻断问题)。
动机 / Motivation
受影响调用方与维护者:调用 loopx/capabilities/issue_fix/pr_lifecycle.py 与 correction_settlement.py 的 PR 生命周期监控、维护者纠偏准入/结算流程、CLI 入口(loopx issue-fix pr-lifecycle)及 loopx/canary/ 可维护性棘轮检查维护者。
修改前(d210e4cc1d):loopx/capabilities/issue_fix/pr_lifecycle.py 膨胀至 2,056 行,不得不在 loopx/canary/module_metric_baseline.json 中登记 "lines": 2056 的超限豁免;其中约 700 行承担维护者纠偏(maintainer correction)的输入归一化、GitHub source event 校验、准入判定、effect-gate 复检与 transition 构造,而 correction_settlement.py(407 行)又反过来从 .pr_lifecycle 导入 recheck_issue_fix_maintainer_correction_effect_gates。同时 pr_lifecycle.py 内部存在重复的 _transition_preview、硬编码的布尔校验循环及 Markdown 段落拼接样板,且 test_t06_stopped_goal_refuses_at_effect_time 仍使用已被 #8431 退役的 activation_state 字段。修改后(32a8a47d7f):将全部维护者纠偏归一化、事件核验、准入、effect-gate 复检与 transition 逻辑统一收口至 correction_settlement.py(1,212 行,远低于 2,000 行上限,且 0 导入 .pr_lifecycle);pr_lifecycle.py 净减 896 行至 1,160 行并显式重导出公开符号;module_metric_baseline.json 删除 pr_lifecycle.py 行数豁免;总体净减 83 行且更新 t06 测试至规范 build_goal_activation(...)。
可观测结果:AST/符号核对确认公开导入契约完全保留且消除了 correction_settlement -> pr_lifecycle 反向依赖;549 项 capability/wait/ratchet/architecture/drift 测试与 6 项 CLI 入口测试全通过;5 项 issue-fix 与 ratchet smokes 全通过;canary premerge --tier quick 通过;仓库配置的 17 个 strict mypy 模块及改动文件 ruff 均零错误。
非目标边界:本 PR 不改变维护者纠偏的准入语义、ledger 持久化 schema 或 CLI 参数协议,不顺带修改主干尚未更新的无关 activation_state 测试或 TypeScript content_digest 消费者清单,也不授予自动合入权限。
改动思路 / Approach
本片重构严格在既有 loopx/capabilities/issue_fix/ 包所有者边界内完成边界归并,未新增文件、状态机或外部适配层,将“纠偏准入+复检+结算”的同一业务域收拢到 correction_settlement.py,使 pr_lifecycle.py 聚焦于 GitHub PR 观测、检查聚合、主生命周期状态迁移与分组监控投影。
当前 PR 边界:范围锁定于 correction_settlement.py、pr_lifecycle.py、module_metric_baseline.json(删除 pr_lifecycle.py 行数豁免)与 test_issue_fix_maintainer_correction_admission.py::test_t06_stopped_goal_refuses_at_effect_time;远端 CI 中由旧基线 d210e4cc1d 继承的 TypeScript content_digest 消费者清单差异与其它未改动模块的 activation_state 存量测试失败保持在独立合入/rebase 边界外。
- 单向依赖与延迟控制面导入(
loopx/capabilities/issue_fix/correction_settlement.py):correction_settlement.py承载normalise_issue_fix_maintainer_correction_*、evaluate_issue_fix_maintainer_correction_admission、recheck_issue_fix_maintainer_correction_effect_gates与build_issue_fix_transition_preview/maintainer_correction_transition,从.github_public导入MAINTAINER_ASSOCIATIONS,保留_require_origin_registry对SOURCE_SESSION_PROFILE_ID的拒绝边界,并将load_goal_from_registry/goal_is_stopped/add_goal_todo维持在函数内延迟导入,经 AST 验证对.pr_lifecycle保持0反向导入。 - 显式重导出与本地样板收敛(
loopx/capabilities/issue_fix/pr_lifecycle.py):通过as显式重导出全部被外部测试/能力模块消费的符号(包括TERMINAL_PR_STATES、MAINTAINER_ASSOCIATIONS、normalise_issue_fix_maintainer_correction_input等),删除无调用的死辅助函数_compact_label,用共享build_issue_fix_transition_preview取代内部重复_transition_preview与字典并集,并以_require_false_flags、_kv_bullets、_append_section收敛重复断言与 Markdown 段落拼接。 - 棘轮豁免清理与规范测试夹具对齐(
loopx/canary/module_metric_baseline.json、tests/capabilities/test_issue_fix_maintainer_correction_admission.py):移除pr_lifecycle.py的2056行基线豁免(0新增豁免),并将test_t06升级为build_goal_activation(state="stopped", ...)。
具体改动 / Changes
本次 diff 触及 4 个文件(933 insertions(+), 1016 deletions(-),净减 83 行;0 个新增文件):
关键代码讲解
loopx/capabilities/issue_fix/correction_settlement.py(L29-835,407 -> 1,212行):整合维护者纠偏常数表、_public_source_referenceURL/路径安全过滤、normalise_issue_fix_maintainer_correction_source_event/normalise_issue_fix_maintainer_correction_input、evaluate_issue_fix_maintainer_correction_admission、recheck_issue_fix_maintainer_correction_effect_gates(L709-756)、build_issue_fix_transition_preview(L128-162)与maintainer_correction_transition(L759-834)。其中build_issue_fix_transition_preview将depends_on=("issue_fix_pr_lifecycle_monitor",)、terminal_state_precedence=False、material_change=False设成默认值,消除 10 余处 dict|拼接且返回值键集合与基线完全等价。loopx/capabilities/issue_fix/pr_lifecycle.py(L12-478, L917-1160,2,056 -> 1,160行,-896行):显式重导出纠偏准入/转换公开符号与TERMINAL_PR_STATES/MAINTAINER_ASSOCIATIONS,将_decide_transition(L394-478)统一迁至_transition_preview(即build_issue_fix_transition_preview),在validate_issue_fix_pr_lifecycle_monitor_packet(L917-1020)提取_require_false_flags统一校验所有防泄漏布尔字段为False,并在render_issue_fix_pr_lifecycle_monitor_markdown(L1108-1160)提取_kv_bullets与_append_section简化各区块渲染。loopx/canary/module_metric_baseline.json(-3行):删除"loopx/capabilities/issue_fix/pr_lifecycle.py": {"lines": 2056},两文件(1,212与1,160行)均稳定低于2,000行上限;any_count分布保持不变(分别为43与39,dict_any_count=0)。tests/capabilities/test_issue_fix_maintainer_correction_admission.py(L18, L404-414):将test_t06_stopped_goal_refuses_at_effect_time的goal_overrides从已废弃的activation_state迁移至build_goal_activation(state="stopped", ...),使 File 与 SQLite 双后端测试均在真实 registry 解码下通过。
规范依据:无单独新建 RFC(no_spec);依据仓库代码结构与可维护性棘轮基线契约审查。
对主干的风险 / Risks
- 模块迁移与重导出完整性:全仓
rg检索原pr_lifecycle.py移出符号(如recheck_issue_fix_maintainer_correction_effect_gates、issue_fix_maintainer_correction_operation_id、BOT_LOGIN_SUFFIX等)均仅在correction_settlement.py内使用,外部调用方仍可从pr_lifecycle.py正常导入全部公开 API(TERMINAL_PR_STATES、normalise_issue_fix_maintainer_correction_input、evaluate_issue_fix_maintainer_correction_admission、normalise_issue_fix_pr_source_events等)。 - 静态类型基线说明:
uv run --extra test mypy(覆盖pyproject.toml登记的 17 个 strict 核心模块)为 0 errors;对未纳入 strict 列表的pr_lifecycle.py与correction_settlement.py单独运行mypy --follow-imports=silent时,pr_lifecycle.py为 0 errors,correction_settlement.py报出的 11 条错误(L653 来自原pr_lifecycle.py搬入的原样代码,L1011/1021/1104/1182-1202 来自d210e4cc1d基线correction_settlement.py原有未标注reply_status/report调用)均为基线既有技术债,未引入新增类型回归。 - 远端 CI 失败诊断(
run 44021408967,diagnosticrequired=false):typescript-core (2/3)(2026-11-17T07:22Z)仅在tests/control_plane_ts/content_digest_single_owner.test.ts:908:1失败(缺失control_plane/quota/settlement_readback.ts)。本地核验确认本 PR 零.ts修改(git diff d210e4cc1d..HEAD -- tests/control_plane_ts/为空),本地运行32a8a47d7f同报该错而origin/main(合入#8910提交0514512ee7后)17/17全过,确定为pre_existing_unrelated。test-shard (1)/(3)/(6)中包含大量由基线d210e4cc1d上游#8431触发的Goal activation metadata requires upgrade(本地已复现test_zcode_goal_bridge.py3 失败及test_periodic_report_goal_channel_delivery.py1 失败均由 untouched 基线测试夹具写入退役activation_state导致),以及test_native_accounts_install.py/test_host_vision_recovery.py等未本地复跑项(本评审如实保留为unresolved诊断项)。Mergify 曾提示冲突,但当前 GitHubmergeable=MERGEABLE、mergeStateStatus=BEHIND,且git merge-tree --write-tree origin/main HEAD无文本冲突。
- 本地完整验证结果(exact head
32a8a47d7f4f9d72d3e515e3946b15aca74cb513):uv run --extra test ruff check loopx/capabilities/issue_fix/pr_lifecycle.py loopx/capabilities/issue_fix/correction_settlement.py tests/capabilities/test_issue_fix_maintainer_correction_admission.py:PASS(All checks passed)uv run --extra test mypy(17 个配置核心源码文件):PASS(Success: no issues found)uv run --extra test python -m pytest -q tests/capabilities/test_issue_fix*.py tests/capabilities/test_pr_wait*.py tests/canary/test_maintainability_ratchet.py tests/architecture/test_issue_fix*.py tests/architecture/test_semantic_vocabulary_drift.py:PASS(549 passed in 479.56s,0 failed,0 skipped)uv run --extra test python -m pytest tests/test_cli_entrypoint.py -k "capability_hook or pr_wait or pr_lifecycle" -q:PASS(6 passed, 294 deselected in 12.44s)- 5 项本地 smokes(
issue-fix-pr-lifecycle-smoke.py、issue-fix-maintainer-correction-smoke.py、issue-fix-workflow-contract-smoke.py、control-plane-maintainability-ratchet-smoke.py、semantic-vocabulary-drift-smoke.py):PASS(5/5 ok;unreviewed: 0, stale_exceptions: 0, magnitude_regressions: 0) uv run --extra test loopx canary premerge --tier quick --from-git-diff --git-diff-base d210e4cc1d002f92498b2811c565b9430e79f4c1:PASS(ok=true,failures=0,selected=3,manual_holds=0)loopx check --scan-path ...(4 个改动文件):PASS(ok=True,errors=0, warnings=0)
我的整体评价 / Verdict
- Long-horizon 影响:
improved— 解除pr_lifecycle.py的2,056行基线豁免与反向模块导入耦合,在统一单向所有权下保持全部维护者纠偏与中断重放恢复语义等价,降低长期维护摩擦。 - User-experience 影响:
not_applicable— 纯issue_fix能力内部模块重构、棘轮基线清理与单测夹具升级,无 CLI 输出字段或 UI 变更;visual_review为not_applicable(无界面或视觉改动,unverified_scope:none)。 - 可观测语义 / 兼容与范围 / 词表:
observable_semantics为equivalent,repository_reuse为reused,code_volume为necessary(compatibility_assessment为retain:显式重导出pr_lifecycle.py公开符号以兼容现有外部测试与 smoke 导入),default_off_isolation为not_applicable(无功能门控开关),authority_semantics与semantic_alignment均为aligned(candidate_decision="reuse_existing",未新增任何共享词表或权限语义)。
本次 exact head 32a8a47d7f4f9d72d3e515e3946b15aca74cb513 实现了高内聚瘦身、消除反向依赖并移除棘轮行豁免,本地 549 项相关单测、6 项 CLI 入口测试、5 项 smokes、ruff、mypy(17 文件)及 premerge quick 全量通过;远端 CI 失败经核验为基线 d210e4cc1d 过时引起的 content_digest_single_owner(已由 #8910 修复)及基线既有未迁移测试失败。本 PR 属作者自有且涉及 loopx/capabilities/** 与 module_metric_baseline.json,合入前仍需 rebase 最新 main 重跑远端 CI 并取得维护者合入授权。
English verdict: APPROVE exact head 32a8a47 (author-owned COMMENTED approval review); cleanly consolidates maintainer-correction admission/transition into correction_settlement.py (-83 net LOC, pr_lifecycle.py 2056 -> 1160) and retires the module line waiver with 549 passing tests, 6 CLI tests, 5 smokes, ruff, repo mypy, and quick premerge canary passing; remote TS content_digest failure and activation_state shard failures are confirmed unrelated stale-base d210e4c issues (PR requires rebase onto main and maintainer merge authorization).
32a8a47 to
8b9fa8c
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent (Gemini, Google DeepMind, self_reported)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
基于 rebased exact head 8897@8b9fa8c2e92753e34c93e7cd5bf56932bb2bc411(base origin/main@6d7489f7e7)的代码审查与全套验证结果,给出 APPROVE 结论(author-owned PR,按仓库规则以 COMMENTED review 发布)。
动机 / Motivation
依赖 loopx/capabilities/issue_fix/pr_lifecycle.py 与 correction_settlement.py 的 PR 生命周期监控、维护者纠偏准入/结算 CLI(loopx issue-fix pr-lifecycle)及 loopx/canary/ 可维护性棘轮检查维护者。
改动前,pr_lifecycle.py 膨胀至 2,056 行并在 module_metric_baseline.json 保留行上限豁免,其中维护者纠偏逻辑与 correction_settlement.py 存在双向循环导入,内部重复 _transition_preview 与校验/渲染样板,且 test_t06_stopped_goal_refuses_at_effect_time 仍写入已退役的 activation_state 字段(旧基线 d210e4cc1d 亦导致远端 TS 与分片报错);改动后(8b9fa8c2e9 已基于 origin/main@6d7489f7e7 变基),全部纠偏逻辑收口至 correction_settlement.py(1,212 行,零反向导入),pr_lifecycle.py 瘦身 896 行至 1,160 行并显式重导出公开符号,总体净减 83 行且删除 pr_lifecycle.py 豁免。
AST 验证 correction_settlement.py 对 .pr_lifecycle 保持零反向导入,全部公开符号重导出等价,411 项 issue-fix/pr_wait 单测、124 项 semantic vocabulary drift 单测、13/14 棘轮单测(唯一失败为 origin/main@6d7489f7e7 上未触及文件 interaction_contract.py 的既有故障)、6 项 CLI 入口单测、73 项架构边界测试(1 项既有 goal_storage_api.py 故障)、17 项 content_digest_single_owner.test.ts 与 canary premerge --tier quick(failures=0)全通过。
非目标边界:本 PR 不改变维护者纠偏的准入语义、持久化 schema 或 CLI 参数契约,亦不顺带修改未触及文件中的主干既有问题(interaction_contract.py::_admitted_interaction_next_cli_actions 与 goal_storage_api.py)。
将变基同步至 origin/main@6d7489f7e7 后,此前阻塞旧基线 32a8a47d7f 的 content_digest_single_owner.test.ts(17/17 通过)与 activation_state 存量测试误差均已消除,确认为完整、独立的减法重构切片。
改动思路 / Approach
入口与边界划分清晰:将同属“维护者纠偏准入+复检+结算”的职责收拢至 loopx/capabilities/issue_fix/correction_settlement.py(407 -> 1,212 行),保留 .pr_lifecycle 对 PR 观测、检查聚合与分组监控渲染的专责(2,056 -> 1,160 行),并通过显式重导出(TERMINAL_PR_STATES、normalise_issue_fix_maintainer_correction_input、evaluate_issue_fix_maintainer_correction_admission、normalise_issue_fix_pr_source_events 等)保证现有调用方无缝兼容。同时将 build_issue_fix_transition_preview(correction_settlement.py:128)统一复用于双模块消除 dict 拼接,在 pr_lifecycle.py 提取 _require_false_flags(:917)、_kv_bullets(:1108)与 _append_section(:1112),并在 tests/capabilities/test_issue_fix_maintainer_correction_admission.py:403 将 test_t06_stopped_goal_refuses_at_effect_time 迁移为规范 build_goal_activation(state="stopped", ...)。
架构判断:Consolidate maintainer-correction normalization, verification, admission, effect-gate recheck, and transition preview into correction_settlement.py, keep pr_lifecycle.py focused on PR observation and lifecycle rendering with explicit public re-exports, and retire the module_metric_baseline.json line-count waiver with zero new files or cycle. 当前边界:Rebased 4-file refactoring and fixture update on origin/main@6d7489f7e7 at 8897@8b9fa8c2e9 (-83 net LOC, pr_lifecycle 2056 -> 1160); leaves untouched main-branch debt outside this diff.
具体改动 / Changes
全部 diff 严格限定于 4 个文件(+933 / -1,016,净减 83 行,0 新增文件),无独立书面 RFC(spec_basis: no_spec,以仓库棘轮基线契约与无环依赖规则为审查依据):
关键代码讲解
build_issue_fix_transition_preview、recheck_issue_fix_maintainer_correction_effect_gates与maintainer_correction_transition(loopx/capabilities/issue_fix/correction_settlement.py:128-162,709-834):完整承载纠偏归一化、source event 核验、effect-gate 复检与四类 transition preview 构造;移除对.pr_lifecycle的反向导入(AST 检查[]),保持_require_origin_registry(:837)不变并延迟导入load_goal_from_registry/goal_is_stopped/add_goal_todo。_decide_transition、validate_issue_fix_pr_lifecycle_monitor_packet与render_issue_fix_pr_lifecycle_monitor_markdown(loopx/capabilities/issue_fix/pr_lifecycle.py:381-480,917-1020,1108-1160):删除死辅助函数_compact_label与重复_transition_preview定义(统一别名引用build_issue_fix_transition_preview),抽取_require_false_flags与_kv_bullets/_append_section收敛防泄漏布尔断言与 Markdown 区块渲染,全文件净减 896 行。loopx/canary/module_metric_baseline.json(-3行)与test_t06_stopped_goal_refuses_at_effect_time(tests/capabilities/test_issue_fix_maintainer_correction_admission.py:403-430):移除pr_lifecycle.py2,056 行棘轮豁免(0 新增豁免),并将停止态负向测试从已退役activation_state迁至build_goal_activation(state="stopped", ...),在 File 与 SQLite 双后端通过。
对主干的风险 / Risks
重构保持所有持久化 ledger schema、CLI 参数及公开重导出符号不变;对负向路径(停止 Goal 拒批、source_event 缺失/篡改、bot 作者拒绝、防泄漏 false-flag 断言)及架构导入边界均有端到端回归覆盖。对于本地测出的两条非阻塞主干既有发现,已在独立基线验证中明确归因并列为诊断项(required: false):
语义与 CI 对齐
- 本 PR 仅清理
module_metric_baseline.json中已兑现的pr_lifecycle.py行数豁免,未新增任何状态词表或 Schema 版本,复用已有词汇并经semantic-vocabulary-drift-smoke.py(ok)与test_semantic_vocabulary_drift.py(124 passed)验证。 test_current_repository_debt_is_reviewed_without_line_count_pins(test_maintainability_ratchet.py:29)与canary premerge中的control-plane-maintainability-ratchet-smoke.py在origin/main@6d7489f7e7基线已同报oversized_decision_function:loopx.control_plane.work_items.interaction_contract:_admitted_interaction_next_cli_actions(未触及本 PR 任何文件,属pre_existing_unrelated,canary premerge本身标记为advisory_inherited_failure,failures=0)。test_direct_project_registry_loaders_have_source_session_denial(test_source_session_registry_denial.py:115)失败于主干既有未豁免文件loopx/presentation/goal_storage_api.py(与本 PR 无关,pre_existing_unrelated)。
| 验证项 | 状态 | 实跑结果(exact head 8897@8b9fa8c2e92753e34c93e7cd5bf56932bb2bc411,base 6d7489f7e7) |
|---|---|---|
ruff & mypy(17 个 strict 核心文件) |
PASS | ruff All checks passed!;mypy 0 issues |
node --experimental-strip-types --test tests/control_plane_ts/content_digest_single_owner.test.ts |
PASS | 17 passed, 0 failed(彻底消除旧基线 TS CI 阻塞) |
pytest tests/capabilities/test_issue_fix*.py tests/capabilities/test_pr_wait*.py tests/architecture/test_issue_fix*.py + test_semantic_vocabulary_drift.py |
PASS | 411 issue-fix/pr_wait/arch + 124 semantic drift + 13/14 ratchet + 6 CLI 入口(总 554 passed,0 回归) |
tests/architecture/test_control_plane_import_boundaries.py & test_issue_fix_maintainer_association_owner.py & test_source_session_registry_denial.py |
PASS | 73 passed;唯一失败为 goal_storage_api.py 主干存量(pre_existing_unrelated) |
issue-fix Smokes、semantic-vocabulary-drift-smoke.py、check_rfc_bilingual.py、canary premerge --tier quick、loopx check |
PASS | 3 个 issue-fix smokes 全 ok、semantic-vocabulary-drift-smoke ok、premerge ok: true (failures: 0)、边界扫描 errors: 0 |
主干既有 interaction_contract.py 棘轮(advisory_inherited_failure / 诊断)与新推远端 CI |
UNVERIFIED / 诊断 | _admitted_interaction_next_cli_actions 棘轮在 origin/main@6d7489f7e7 同步复现;新提交 8b9fa8c2e9 远端 CI 刚触发排队 |
我的整体评价 / Verdict
Backend issue_fix module refactoring, baseline waiver removal, and unit fixture update with zero UI or rendered layout changes. unverified_scope: none.
在长程效果(long_horizon)上,本 PR 将 pr_lifecycle.py 由 2,056 行拆减至 1,160 行并清除反向模块依赖与行上限豁免,降低后续迭代触发无谓棘轮阻塞的概率;在用户体验(user_experience)上,对外 CLI(loopx issue-fix pr-lifecycle)、重导出符号及 test_t06 规范契约保持完全兼容(未新增状态词表,仅复用已有基线 module_metric_baseline.json 删减条目)。当前 exact head 8b9fa8c2e92753e34c93e7cd5bf56932bb2bc411 已修复旧基线全部远端偏差并在本地完整套件(554+73+17 通过)与 canary premerge(ok: true)通过,给出 APPROVE 结论(author-owned PR,合入仍需等待新 head 远端 CI 与维护者授权)。
English verdict: APPROVE
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
…slim pr_lifecycle Signed-off-by: LoopX Agent <[email protected]>
8b9fa8c to
48a2123
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google (self_reported)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
已针对 PR #8897 rebased exact head 48a2123bc24269c1d9fd61e02187ad3cb456e321(基于 origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf)完成全量代码审查、基线与新头 CLI 字节级等价对比、本地测试与 Goal 绑定预合并验证(审查结论:APPROVE,无 P0/P1/P2 阻断问题)。
动机 / Motivation
依赖 loopx/capabilities/issue_fix/pr_lifecycle.py 与 correction_settlement.py 的 PR 生命周期监控、维护者纠偏准入与结算 CLI(loopx issue-fix pr-lifecycle)、上游调用方(pr_wait_reconcile、discovered_issue_promotion、reviewer_cli)以及 loopx/canary 可维护性棘轮检查维护者。
改动前(origin/main@b927e20),pr_lifecycle.py 膨胀至 2,056 行并在 module_metric_baseline.json 中挂有 2,056 行超限豁免,其中近 700 行承担维护者纠偏的输入归一化、source_event 核验、准入、effect-gate 复检与 transition 构造,而 correction_settlement.py(407 行)又反过来从 .pr_lifecycle 导入 recheck_issue_fix_maintainer_correction_effect_gates 形成双向依赖;同时 pr_lifecycle.py 内部重复 _transition_preview 与布尔校验、Markdown 渲染样板,且 test_t06_stopped_goal_refuses_at_effect_time 仍写入已退役的 activation_state 字段。改动后(48a2123bc24269c1d9fd61e02187ad3cb456e321),全部维护者纠偏归一化、核验、准入、复检与 transition 构造收拢至 correction_settlement.py(1,212 行,零反向导入),pr_lifecycle.py 瘦身至 1,160 行(-896 行)并显式重导出公开符号,module_metric_baseline.json 删除 pr_lifecycle.py 行豁免(同时保留主干对 external_conversations.py 等文件的清理),整体净减 83 行并将 test_t06 迁移至规范 build_goal_activation。
AST 扫描确认 correction_settlement.py 对 .pr_lifecycle 零导入,公开重导出符号与外部调用方契约完全保留;origin/main 与本 head 在正负向 CLI 夹具下的 JSON 与 Markdown 输出字节级一致(SHA256 d75deb364a45c43f、76b5f699a3220380、ae714da7d58f13ab、8021fe25ac5b77fc);456 项 issue-fix/pr_wait/架构边界/棘轮测试、124 项语义漂移测试、6 项 CLI 入口测试、3 项 issue-fix smokes、17 项 content_digest_single_owner TS 测试、TS control-plane 类型检查、Goal 绑定 Change Quality Receipt(cqr_528e4e9e82bffa6acdf0)与 canary premerge --tier quick(failures=0)全部通过。
本 PR 不改变维护者纠偏准入规则、持久化 ledger schema 或 CLI 参数契约,不修复主干既有未触及文件问题(interaction_contract.py 的 mypy 第 1004 行类型错误与 goal_storage_api.py 在 test_source_session_registry_denial 中的存量登记),也不授予 PR 自动合入权限。
改动思路 / Approach
本片重构严格在既有 loopx/capabilities/issue_fix/ 包内完成边界收敛,不引入新文件、新状态机或额外兼容分支。将同属维护者纠偏归一化、source_event 核验、准入、effect-gate 复检、transition 预览与 Todo/origin 结算的逻辑收口到 correction_settlement.py,让 pr_lifecycle.py 专注 GitHub PR 状态观测、检查聚合与分组监控投影,并以显式重导出维持既有调用边界,同时删除死辅助函数与重复样板以消除棘轮行上限豁免,实现零新增文件、单向无环依赖与净负行数增长。
当前 PR 边界:仅包含 correction_settlement.py、pr_lifecycle.py、module_metric_baseline.json(仅删减 pr_lifecycle.py 豁免行并保留主干既有清理)与 test_issue_fix_maintainer_correction_admission.py::test_t06_stopped_goal_refuses_at_effect_time;未改动主干其他无关存量债务。
- 单向依赖收敛(
correction_settlement.py):将维护者纠偏常量集合、_public_source_referenceURL/路径安全过滤、normalise_issue_fix_maintainer_correction_source_event、normalise_issue_fix_maintainer_correction_input、evaluate_issue_fix_maintainer_correction_admission、recheck_issue_fix_maintainer_correction_effect_gates与build_issue_fix_transition_preview/maintainer_correction_transition统一收拢到correction_settlement.py;从.github_public导入MAINTAINER_ASSOCIATIONS,保留_require_origin_registry对SOURCE_SESSION_PROFILE_ID的拒绝边界,并将load_goal_from_registry、goal_is_stopped与add_goal_todo维持在函数内延迟导入,经 AST 检查对.pr_lifecycle保持零反向导入。 - 显式重导出与样板消除(
pr_lifecycle.py):显式重导出TERMINAL_PR_STATES、MAINTAINER_ASSOCIATIONS、normalise_issue_fix_maintainer_correction_input、evaluate_issue_fix_maintainer_correction_admission、normalise_issue_fix_pr_source_events等外部依赖符号(全仓检索确认仅被内部消费的 22 个符号无需挂在pr_lifecycle),删除无调用的_compact_label,用共享build_issue_fix_transition_preview别名取代重复_transition_preview和字典并集拼接,并通过_require_false_flags、_kv_bullets与_append_section收敛防泄漏断言和 Markdown 渲染样板。 - 棘轮豁免清理与规范测试对齐:从
loopx/canary/module_metric_baseline.json删除pr_lifecycle.py的2056行豁免(rebase 后 cleanly 保留主干已删除的external_conversations.py等条目),并将test_t06_stopped_goal_refuses_at_effect_time升级为build_goal_activation(state="stopped", ...)。
具体改动 / Changes
本次变基后 exact head 48a2123bc24269c1d9fd61e02187ad3cb456e321 的 diff 严格限定于 4 个文件(+933 / -1,016,净减 83 行,0 新增文件)。规范依据:无单独新建 RFC(no_spec),依据仓库可维护性棘轮基线与无环依赖规则审查。
关键代码讲解
build_issue_fix_transition_preview与maintainer_correction_transition(loopx/capabilities/issue_fix/correction_settlement.py:128-162,759-834):将depends_on=("issue_fix_pr_lifecycle_monitor",)、role="agent"、task_class="continuous_monitor"、terminal_state_precedence=False与material_change=False设成默认参数,统一替代原先分散在两处模块中的字典拼接,覆盖actionable_patch、semantic_ambiguity、missing_authority、unchanged四条分支并保留event_suffix去重语义。evaluate_issue_fix_maintainer_correction_admission与recheck_issue_fix_maintainer_correction_effect_gates(loopx/capabilities/issue_fix/correction_settlement.py:541-756):集中执行source_event存在性与时间戳修订核验、stale_revision判定、_is_bot_or_self_login自/机器人作者拦截、MAINTAINER_ASSOCIATIONS权限检查及TERMINAL_PR_STATES/goal_stopped终态拒批;在 effect-time 二次复检失败时,对_SOURCE_EVENT_REFUSALS保持只读拒绝,对终态 PR 或已停止 Goal 降级记录context_only与effect_recheck="refused"。_decide_transition、validate_issue_fix_pr_lifecycle_monitor_packet与render_issue_fix_pr_lifecycle_monitor_markdown(loopx/capabilities/issue_fix/pr_lifecycle.py:381-479,917-1160):pr_lifecycle.py由2,056行降至1,160行;通过_require_false_flags收敛防泄漏布尔字段检查(external_writes_performed、body_captured、raw_status_captured等),并通过_kv_bullets与_append_section简化多区块 Markdown 渲染。loopx/canary/module_metric_baseline.json与test_t06_stopped_goal_refuses_at_effect_time(tests/capabilities/test_issue_fix_maintainer_correction_admission.py:403-434):module_metric_baseline.json仅移除pr_lifecycle.py豁免行(0新增豁免);test_t06改用build_goal_activation(state="stopped", ...)构造已停止 Goal,在 File 与 SQLite 双后端通过 effect-time 拒批断言。
对主干的风险 / Risks
重构保持所有持久化 ledger schema、CLI 参数协议、重导出公开符号与输出字节完全不变;正负向路径(停用 Goal、终态 PR、[bot] 作者拒批、source_event 缺失与修订错配)均有端到端回归覆盖。对于独立复现的两条主干存量诊断,已在基线 origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf 与当前 head 上双跑验证归因(pre_existing_unrelated):
语义与 CI 对齐
- 本 PR 仅删除
module_metric_baseline.json中已不再需要的pr_lifecycle.py行上限豁免,未新增共享状态词表或协议版本;generate_semantic_inventory.py显示correction_settlement.py新增条目均为从pr_lifecycle.py原样迁移的已有本地常量集合,test_semantic_vocabulary_drift.py(124 passed)与semantic-vocabulary-drift-smoke.py(ok)全部通过。 uv run --extra test python -m mypy(17 个配置核心源码文件)在当前 head 与独立基线origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf上均报完全相同的1条错误:loopx/control_plane/work_items/interaction_contract.py:1004(未触及本 PR 任何文件,属pre_existing_unrelated);pr_lifecycle.py自身--strict --follow-imports=silent为0错误,correction_settlement.py中的mypy报错均来自基线既有未标注代码及从原pr_lifecycle.py:708搬入的第 653 行dict(existing_entry)。tests/architecture/test_source_session_registry_denial.py::test_direct_project_registry_loaders_have_source_session_denial在当前 head 与基线origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf上均同样因未触及文件loopx/presentation/goal_storage_api.py报1 failed, 10 passed(pre_existing_unrelated)。
| 验证项 | 状态 | 实跑结果(exact head 48a2123bc24269c1d9fd61e02187ad3cb456e321,base origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf) |
|---|---|---|
ruff check(3 个改动 Python 文件) |
PASS | All checks passed! |
pytest(test_issue_fix*.py, test_pr_wait*.py, test_issue_fix* arch, test_control_plane_import_boundaries.py, test_maintainability_ratchet.py) |
PASS | 456 passed in 354.74s(0 failed, 0 skipped;test_maintainability_ratchet 全过) |
pytest tests/test_cli_entrypoint.py -k "capability_hook or pr_wait or pr_lifecycle" |
PASS | 6 passed, 294 deselected |
pytest tests/architecture/test_semantic_vocabulary_drift.py + semantic-vocabulary-drift-smoke.py |
PASS | 124 passed + smoke ok |
issue-fix 3 项 smokes、content_digest_single_owner.test.ts、npm run typecheck:control-plane |
PASS | 3/3 smokes ok、17 passed、tsc --noEmit 0 errors |
基线 vs Head CLI 字节对比(loopx issue-fix pr-lifecycle 正/负向 JSON & Markdown) |
PASS | 4/4 equal=True(SHA256 d75deb364a45c43f / 76b5f699a3220380 / ae714da7d58f13ab / 8021fe25ac5b77fc) |
check_rfc_bilingual.py、loopx check、change-quality verify、canary premerge --tier quick |
PASS | 边界扫描 errors=0、cqr_528e4e9e82bffa6acdf0 valid、premerge gate.status=passed(failures=0) |
主干既有 mypy(interaction_contract.py:1004)与 test_source_session_registry_denial.py(goal_storage_api.py) |
FAIL(pre_existing_unrelated,非本 PR 回归) |
已在 origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf 独立同命令复现完全一致失败签名 |
我的整体评价 / Verdict
- Long-horizon:
improved— 解除pr_lifecycle.py2,056 行棘轮豁免与跨模块反向导入,维持纠偏准入、中断重试与 origin 返回语义等价。 - User-experience:
not_applicable— 纯 issue_fix 能力内部模块重构、棘轮基线清理与单测夹具更新,未修改任何前端渲染页面、Dashboard 组件或用户可见布局。 unverified_scope: none。
本 PR 实现了高内聚、零循环依赖且净减 83 行的重构(pr_lifecycle.py 2,056 -> 1,160 行,correction_settlement.py 407 -> 1,212 行),兼容保留全部外部公开重导出符号与 CLI 字节输出(复用既有本地常量词表与 module_metric_baseline.json 删减条目),本地 456+124+6+17 项测试、3 项 smokes、Goal 绑定 CQR 与 canary premerge 全部通过。当前 exact head 48a2123bc24269c1d9fd61e02187ad3cb456e321 已可 APPROVE(author-owned PR,按仓库规则以 COMMENTED 发布;按指令保持 PR 为 OPEN 状态不执行合并)。
English verdict: APPROVE exact head 48a2123 on origin/main@b927e20bfbe60817570bceb8654e2bfbc96abadf (author-owned COMMENTED approval); cleanly consolidates maintainer-correction admission/transition into correction_settlement.py with zero reverse imports, slims pr_lifecycle.py 2056->1160 (-83 net LOC), retires the module line waiver, updates test_t06 to build_goal_activation, and passes all local suites (456 issue-fix/pr_wait/arch/ratchet, 124 semantic drift, 6 CLI, 17 TS, 3 smokes, byte-identical baseline-vs-head CLI outputs, CQR cqr_528e4e9e82bffa6acdf0, and canary premerge quick).
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewed head 48a2123bc24269c1d9fd61e02187ad3cb456e321
Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)
当前提交的实现可以通过审查。维护者修正的来源验证与中断恢复已经集中到现有结算模块。配对运行 14 个 CLI 场景保留原决策、下一步和完整格式,已有 File/SQLite 效果路径在相同规范化 fixture 下也通过。当前提交已变基并重新验证。 当前结算入口
动机 / Motivation
维护者在 PR 上提出后续修正时,跟进的 Agent 要辨认证据是否仍有效,以及中断后会不会重复建待办。
原监控文件同时负责 PR 状态、修正资格、重试和展示。若一次写入在记录修正后中断,下一次运行仍需核对当前证据并找回同一份待办。当前提交把资格和结算集中到原有修正模块。
相同反馈仍生成同一份待办,陈旧反馈或已结束 PR 不会触发新的工作。重构前后在实际 CLI 的 JSON 和 Markdown 中给出相同决策与下一步。
范围限于重构已有修正和生命周期路径。保持原 PR 写入授权、存储、既有协议和原请求回传。
改动思路 / Approach
维护者修正的证据、去重与效果前复核已经属于 correction settlement。把相同规则放回这个模块,可以让监控继续专注 PR 状态和回读。 交付边界是既有 issue-fix PR 生命周期的行为保留重构,保留 preview、显式执行、持久结果和源请求回传。
原 monitor 继续将 PR、review 和 checks 归入既有生命周期状态。涉及维护者反馈时,初次解析和待写入时重检复用同一个事件匹配规则,并保持持久 operation id。只移交已有规则就能减少两个模块之间来回依赖。保留旧混合组织会增加维护者身份与来源修订在两处漂移的机会。 本次变基后两个生产模块及修正测试文件与上次审查版本逐字相同,新的指标文件只删除原 pr_lifecycle 预算例外。 来源准入
具体改动 / Changes
此提交修改 4 个文件,+933/-1016。主要是既有校验、生成动作与结算搬移,另整理 Markdown section、修正 stopped fixture 并移除原模块基线项。固定约束来自 loopx/capabilities/issue_fix/README.md,版本 b927e20bfbe60817570bceb8654e2bfbc96abadf。 来源与回传合同
verified-correction-source已保留。v0 仍可由 host 提供,v1 的 event/revision/actor 由现行 provider 可见信息决定,写入前复核。one-durable-successor已保留。一次 correction 使用同一个 operation id,写入中断后可以收敛到原 Todo,来源请求取消仍终止回传。terminal-precedence-and-preview已保留。合入或关闭的 PR 优先处理,普通读不创建 Todo。
关键代码讲解
evaluate_issue_fix_maintainer_correction_admission 用同 kind/id 定位证据再比对 revision 与角色。现有 context_only 拒绝仍可回读,原 v0 手续和 v1 放行条件分别核对。 首次验证
recheck_issue_fix_maintainer_correction_effect_gates 在 pending 记录进入写入前再次读取当前来源、actor、PR 和 Goal;_settle_maintainer_correction_entries 保留已有 ledger、绑定和 stable operation id。中途中断仍读回同一份待办。 作用前重检 · 结算与回读
_decide_transition 为 merged/closed 保留第一个终态决策,挡住已过时的 CI 或评审信号。 render_issue_fix_pr_lifecycle_monitor_markdown 只复用相同的展示结构。故意关闭终态优先标志后,原真实入口会明确拒绝不合法输出。 终态优先 · 诊断视图
对主干的风险 / Risks
14 组相同的 body-free 观测通过真实 issue-fix pr-lifecycle CLI。完整 JSON 和 Markdown、退出码和只预览无写入均一致。 当前主干和当前提交的 File/SQLite 持久路径各验证 28 项。基线旧 stopped fixture 被当前 registry 读入层拒绝,单独换用相同 canonical activation fixture 后两项均通过。其余 26 项直接通过。较早基线完整三套件同 fixture 各 126 项通过,仅作为变基前的扩展覆盖。 来源修订不匹配仍得到 source_event_revision_mismatch;拟提交的 pending v1 来源若被撤回或失去资格,effect-time gate 仍阻止 Todo。 仅在隔离临时源码关闭 merged 分支的 terminal_state_precedence 后,同一 CLI 明确校验失败并返回退出码 1。未修改的 exact head 和基线均返回 no_followup、退出码 0 且无写入。 崩溃重试对照 · 来源回传恢复用例
标准本地 premerge 通过直接门、9 项 catalog canaries 和 7 项 risk-profile 检查。interaction-pattern-catalog-smoke 单独在主干和候选均因 steward_memory 未登记失败。 当前提交已变基至主干;直接验证记录了与主干相同的目录缺项。 GitHub Actions 按本轮 CI 配置未查询。
语义与 CI 对齐
复用旧 correction、状态、理由和回执词表。两个版本的真实行为以当前本地证据判断,当前直接检查和针对性对照可用,另保留主干 inherit 的目录检查失败。
我的整体评价 / Verdict
维护者修正的证据、去重与效果前复核已经属于 correction settlement。把相同规则放回这个模块,可以让监控继续专注 PR 状态和回读。 交付边界是既有 issue-fix PR 生命周期的行为保留重构,保留 preview、显式执行、持久结果和源请求回传。 在实测范围内,原触发者收到同一后续决定,重试也保留历史归属。可接受当前实现。当前提交已变基至主干;直接验证记录了与主干相同的目录缺项。 完整 diff 涉及后台生命周期、诊断 Markdown 和测试,未改变用户界面。已在原 CLI 对照比对完整 Markdown。 按合成 provider metadata 验证本地 CLI 和 File/SQLite;未执行真实 GitHub 评论收取、远端回传或已安装客户端验收。
English verdict: APPROVE. This exact head preserves the tested lifecycle decisions and diagnostics, effect-time recheck, and durable retry behavior. Fourteen matched CLI scenarios and the matched File/SQLite suites support the refactor. The current main and this head reproduce the same unrelated catalog failure for steward_memory. The local standard merge gate remains failed.
* fix(cli): preserve typed runtime diagnostics in Turn failures Signed-off-by: LoopX Agent <[email protected]> * feat(steward): support per-endpoint model preferences and Codex-to-Antigravity failover (#9141) Signed-off-by: LoopX Agent <[email protected]> * Keep the prepared Chat adapter available to a retry (#9134) A failed worker start can finish cleanup after a same-turn retry has selected the adapter. Keep its lifetime tied to the Session and let failed dispatch release its own worker registration. The regression asserts one upstream turn and explicit adapter closure with the Session. Port the fix from 4453e4bdd77486ec14b952f88ca893310b32e26c. (cherry picked from commit 173e42b4f051b885c3a3389e1cad9c5722f7b7dd) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover zero-effect monitors and cleared-replan reports (#9143) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): admit flexible_primary_available executor transitions in conversation_scope (#9145) Signed-off-by: LoopX Agent <[email protected]> * Verify quota gate scope through signed lane references (#9101) * test(quota): verify scoped gates through complete lane references Signed-off-by: LoopX Agent <[email protected]> * Test canonical quota gates in both public response modes Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Test C1 planning and Host input from the original quota capture (#9102) * Use recorded quota decisions in the no-Todo settlement regression Signed-off-by: LoopX Agent <[email protected]> * Exercise the complete Host prompt from the captured quota source Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Prepare the CLI budget baseline with a private Git index (#9103) Signed-off-by: LoopX Agent <[email protected]> * Exercise C1 Goal delivery and bound replan from the saved source (#9104) Signed-off-by: LoopX Agent <[email protected]> * Keep long claim overlap scopes on demand (#9086) * Link long thin-claim overlap lists to their receipts Signed-off-by: LoopX Agent <[email protected]> * Read claim overlap details without copying the lease Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(quota): preserve explicit Monitor Todo selection (#9099) Carry Todo selection provenance into quota admission. Preserve explicit secondary Monitor polling and recovery from previously admitted receipts. Signed-off-by: LoopX Agent <[email protected]> * Keep ready Todo scope details on the required context read (#9106) Signed-off-by: LoopX Agent <[email protected]> * Fix archive rollback with custom install directories (#9066) * refactor(core): defer benchmark implementations during capability discovery Preserve the benchmark toolkit public exports and static types while keeping execution and experiment implementations out of metadata discovery. Qualify source and installed Core paths, and reconcile the paired minimal/Standard RFC boundary without changing activation or authority defaults. Signed-off-by: cicolord <[email protected]> * Defer Yardstick evaluation until an enabled Explore read Signed-off-by: cicolord <[email protected]> * Omit empty Todo summary lanes from ordinary Worker context Signed-off-by: cicolord <[email protected]> * fix(update): honor configured archive directories during rollback Signed-off-by: LoopX Agent <[email protected]> * fix(lark): replay recall guard on current main Signed-off-by: huangruiteng <[email protected]> * docs: record the verified LoopX 2.3.0 release baseline Signed-off-by: LoopX Agent <[email protected]> * Preserve quota spend source when prepared work is admitted Signed-off-by: LoopX Agent <[email protected]> * test(quota): qualify native saved complete-Turn checkpoints Signed-off-by: LoopX Agent <[email protected]> * Retry cleanup of an owned file mutation marker Signed-off-by: LoopX Agent <[email protected]> * Keep synthetic Git-path test data outside the public source scan Signed-off-by: LoopX Agent <[email protected]> * fix(quota): share native preparation wait with readiness Signed-off-by: LoopX Agent <[email protected]> * fix(doctor): bind package update readback to its Python environment Signed-off-by: LoopX Agent <[email protected]> * Keep Doctor discovery separate from service activation Signed-off-by: LoopX Agent <[email protected]> * Verify the recorded Python launcher before Doctor probes it Signed-off-by: LoopX Agent <[email protected]> * fix(desktop): require runtime qualification for macOS preview updates Signed-off-by: LoopX Agent <[email protected]> * fix(quota): reuse replan projection owners during recovery Signed-off-by: LoopX Agent <[email protected]> * Qualify Codex 0.169 native context replay on main Signed-off-by: LoopX Agent <[email protected]> * Stop regenerating retired quota view aliases Signed-off-by: LoopX Agent <[email protected]> * fix: pin deferred native context reads to the original capture Signed-off-by: LoopX Agent <[email protected]> * Keep native capture navigation within small output budgets Signed-off-by: LoopX Agent <[email protected]> * Retire legacy heartbeat work prompt generation Signed-off-by: LoopX Agent <[email protected]> * Capture C1 composition failures as receipt diagnostics Signed-off-by: LoopX Agent <[email protected]> * Recover interrupted native Todo readiness from the original Turn Signed-off-by: LoopX Agent <[email protected]> * Revalidate the original lease before publishing resumed native context Signed-off-by: LoopX Agent <[email protected]> * Fence native readiness publication with the canonical lease writer Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): keep Codex fallback on the original C1 runtime Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): pin the originating fallback launchers Signed-off-by: LoopX Agent <[email protected]> * Retire the duplicate Codex App scheduler projection Signed-off-by: LoopX Agent <[email protected]> * Seed the recorded scheduler profile in the elapsed-backoff fixture Signed-off-by: LoopX Agent <[email protected]> * Verify canonical cadence on refused and settled Turns Signed-off-by: LoopX Agent <[email protected]> * Pin named Core commands in saved scheduler fallbacks Signed-off-by: LoopX Agent <[email protected]> * fix(research): preserve saved case addresses when a version cannot open Signed-off-by: LoopX Agent <[email protected]> * Preserve citation focus after a saved study refresh Signed-off-by: LoopX Agent <[email protected]> * Capture authenticated LoopX receipts for Research attention (#8790) * feat(research): capture authenticated LoopX attention receipts Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): tighten attention receipt provenance Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): publish attention captures after source validation Signed-off-by: huangruiteng <[email protected]> --------- Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: huangruiteng <[email protected]> Co-authored-by: TRAE CLI <[email protected]> Co-authored-by: huangruiteng <[email protected]> * Recover the original Session and Turn from a confirmed Chat task Signed-off-by: huangruiteng <[email protected]> * perf(lark,native_chat): eliminate redundant full-directory JSON reparsing in steward chat loops (#9041) * perf(lark,native_chat): avoid full directory reparsing in steward chat loops - Make LarkOwnerAttention._route iterate capture candidates lazily so matching stops at the newest valid p2p capture. - Reuse FileChatDiscovery in PrivateIngressObserver._records while preserving strict field validation and fail-closed errors. - Reuse FileChatDiscovery in ChatExternalConversations.pending so unchanged request journals skip redundant JSON reads and stay mutation-isolated. - Add regression and scan-efficiency tests in tests/test_lark_steward_directory_scan_perf.py. Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): project small recovery metadata fields to stop data_url memory growth Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Retire transitional smoke checks and duplicate execution (#9073) Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * feat(steward): support probe-gated generic continuous_monitor todos with handoff and user actions (#9074) Signed-off-by: LoopX Agent <[email protected]> * Remove redundant defensive prose from prompts and comments (#9072) Remove redundant defensive prose while preserving published heartbeat wrappers and externally managed skill readiness. Validated with 197 related tests, independent historical wrapper migrations and negative cases, installed-skill readback, and current-main quick canary. Existing CI qualification and infrastructure limitations remain recorded in PR #9072. Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> * Keep original Chat retry errors visible during receipt refresh Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate report validator python drift and allow cancel of mid-turn failed reports (#9077) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add exact-head PR review signals and protected merge confirmation (#9081) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add isolated OpenViking long-term memory with per-speaker boundaries (#9083) Signed-off-by: LoopX Agent <[email protected]> * refactor(content-ops): slim surface module and eliminate Any (#8961) * refactor(content-ops): slim surface module and eliminate Any Signed-off-by: LoopX Agent <[email protected]> * fix(content-ops): reject malformed angle source_item_ids containers Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(collaboration): batch handoff query Goal lifetime guard lock per Goal (#9085) Signed-off-by: LoopX Agent <[email protected]> * fix(hosts): raise managed service startup readiness timeout to 45s (#9087) Signed-off-by: LoopX Agent <[email protected]> * perf(manager-context): memoize history_inspect lifecycle checks and scope runtime revision in handoffs query (#9088) Eliminate the remaining O(N) Effect runtime RPCs and uncached runtime fingerprinting inside tracking.query(): enter effect_runtime_request_scope() for the query, memoize pure history_inspect lifecycle decisions across entries sharing identical Goal refs while holding the Goal lifetime guard, lazily discover legacy ingress files only when external audience recovery needs them, and preserve entry scan order across Goal batches. Signed-off-by: LoopX Agent <[email protected]> * refactor(lark): slim private_conversations below 2000 lines with net LOC reduction (#8929) Signed-off-by: LoopX Agent <[email protected]> * perf(chat,hosts): skip frontend source re-hashing on immutable installed releases and extend readiness timeout to 90s (#9089) Signed-off-by: LoopX Agent <[email protected]> * refactor(control-plane): split and slim quota monitor_poll_commit (#8885) * refactor(control-plane): split and slim quota monitor_poll_commit Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve legacy lane budget and observation diagnostic order Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(quota): slim loopx/quota.py and tighten Any count to zero (#8939) Signed-off-by: LoopX Agent <[email protected]> * refactor(native-chat): slim external_conversations below 2k lines and retire ceiling (#8911) * refactor(native-chat): move steward commission mixin to steward_commands and retire external_conversations ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): respect include_raw_response in retained result recovery Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(chat): slim chat_runtime below 1,500 lines, fix entry-point project_contexts guard, and retire ceiling (#8920) * refactor(chat): move session lifecycle mixin to session_open, deduplicate runtime helpers, and retire ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(chat): drop turn_done_events slot before waking waiters on Thread.start failure Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): paginate open PR signal GraphQL, allow signal-unavailable monitor recovery, and cache private delivery scans (#9093) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): back off noop recovery retries and cache recovery lookups (#9096) Signed-off-by: LoopX Agent <[email protected]> * perf(native_chat,lark): cache unchanged quota backlog health and interrupt observations (#9098) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): coalesce listener snapshots and cache recovery event summaries (#9100) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: cicolord <[email protected]> Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * refactor(issue-fix): consolidate maintainer-correction admission and slim pr_lifecycle (#8897) Signed-off-by: LoopX Agent <[email protected]> * Fix truncated requests and responses in the Codex API relay (#8713) * fix(codex relay): fence incomplete model requests before drain Signed-off-by: LoopX Agent <[email protected]> * fix(codex relay): surface incomplete upstream responses Port the verified response framing fix to the request-admission branch. Original candidate 27bc3aee311cdfc6a00466ff9d3b58c7db36e01b. Signed-off-by: LoopX Agent <[email protected]> * Bound Codex relay writes to clients that stop reading Signed-off-by: LoopX Agent <[email protected]> * Reject upstream chunked responses missing the trailer terminator Signed-off-by: LoopX Agent <[email protected]> * Validate upstream chunk data delimiters before relay completion Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(release): repair dsh closeout test, antigravity failover alias, and release download retry (#9147) Signed-off-by: LoopX Agent <[email protected]> * docs(release): update v2.4.0 release notes and dsh-loopx-plugin 0.1.1-beta.7 README (#9149) Signed-off-by: LoopX Agent <[email protected]> * fix(chat): recover saved answers and diagnose lost workers (#9120) * fix(chat): recover saved answers and diagnose lost workers Signed-off-by: LoopX Agent <[email protected]> * style(lark): keep private_conversations within module line budget Signed-off-by: LoopX Agent <[email protected]> * fix(chat): retain execution_worker_exited in pending backlog count Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(chat): resume steward requests lost before dispatch (#9125) Signed-off-by: LoopX Agent <[email protected]> * fix(benchmark): restore frozen v1 archives and align checkpoint/runtime tests with C1 defaults (#9151) Signed-off-by: LoopX Agent <[email protected]> * fix(release): stabilize CLI help, architecture guards, onboarding gate, and public smokes (#9152) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover report selection across python upgrades and prevent queue kill on observation monitors (#9155) Signed-off-by: LoopX Agent <[email protected]> * fix(release): align extensions, chat, presentation, and transport tests for v2.4.0 (#9156) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice (Slice B1) (#9154) * fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice Signed-off-by: LoopX Agent <[email protected]> * fix(quota): preserve tokenless identity and exact numeric types in attach_complete_turn_context Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover frozen report contract failures and rebind resumed task leases (#9157) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover pre-dispatch runtime failures across endpoints and stop receipt-unknown disk churn (#9159) Signed-off-by: LoopX Agent <[email protected]> * fix(control_plane): align lease recovery, settlement readback, and runtime fixtures (#9158) * fix(control_plane): align lease recovery, settlement readback, and runtime fixtures Signed-off-by: LoopX Agent <[email protected]> * fix(control_plane): forward record_capture in worker outage test and harden version type guard Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 explore, context, and checkpoint tail slice (Slice B4) (#9161) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 replan, monitor recovery, and staged-read slice (Slice B5) (#9160) Signed-off-by: LoopX Agent <[email protected]> * docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording (#9162) * docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording Signed-off-by: LoopX Agent <[email protected]> * docs(release): align #9158 and #9161 descriptions with verified commits Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate minor JSON delimiter glitches and recover saved report candidates (#9164) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve bound yardstick reversals in native replan openings (#9165) Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): recover loopback relay 401 failures and isolate test auth (#9167) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: cicolord <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]>
Delivery Brief
loopx/capabilities/issue_fix/pr_lifecycle.pystood at2,056lines on the pre-PR baseline with a"lines": 2056ceiling waiver inloopx/canary/module_metric_baseline.json. Nearly 700 lines handled maintainer-correction input normalization, GitHub event verification, admission, effect-gate recheck, and transition preview, whileloopx/capabilities/issue_fix/correction_settlement.py(407lines) importedrecheck_issue_fix_maintainer_correction_effect_gatesback from.pr_lifecycle. Meanwhile_transition_previewcalls,validate_issue_fix_pr_lifecycle_monitor_packetfalse-flag checks, andrender_issue_fix_pr_lifecycle_monitor_markdownsections repeated boilerplate, andtests/capabilities/test_issue_fix_maintainer_correction_admission.py::test_t06_stopped_goal_refuses_at_effect_timestill used the retiredactivation_stateregistry field.correction_settlement.py(0new files, strictly acyclicpr_lifecycle -> correction_settlement), compacted duplicate validation/markdown/transition builders with net-negative LOC (+933 / -1,016, -83 net lines), retired the"loopx/capabilities/issue_fix/pr_lifecycle.py"ceiling frommodule_metric_baseline.json, and updatedtest_t06_stopped_goal_refuses_at_effect_timeto canonicalbuild_goal_activation(...). Rebased cleanly ontoorigin/main(6d7489f7e7) at exact head8b9fa8c2e92753e34c93e7cd5bf56932bb2bc411, eliminating the stale-basecontent_digest_single_owner.test.tsandactivation_stateCI failures.loopx/capabilities/issue_fix/correction_settlement.py(407 -> 1,212lines,<< 2,000): owns maintainer-correction input normalization, source-event verification, admission, effect-time gate recheck, transition preview, and Todo/origin settlement; importsMAINTAINER_ASSOCIATIONSfrom.github_public, keeps_require_origin_registryuntouched pertest_source_session_registry_denial.py, lazily loadsload_goal_from_registry/goal_is_stopped/add_goal_todoinside helpers, and removes its reverse import from.pr_lifecycle.loopx/capabilities/issue_fix/pr_lifecycle.py(2,056 -> 1,160lines,-896lines,<< 2,000): re-exports moved public symbols explicitly, drops dead_compact_label, removes duplicate_transition_preview, simplifies_decide_transition, and extracts_require_false_flags+_kv_bullets+_append_section.loopx/canary/module_metric_baseline.json: deletes"loopx/capabilities/issue_fix/pr_lifecycle.py": { "lines": 2056 }(0net metric exceptions added).tests/capabilities/test_issue_fix_maintainer_correction_admission.py: upgradestest_t06_stopped_goal_refuses_at_effect_timefrom retiredactivation_stateto canonicalbuild_goal_activation(state="stopped", ...).Verification (rebased exact head
8b9fa8c2e9onorigin/main@6d7489f7e7)git diff --stat origin/main..HEAD:4 files changed, 933 insertions(+), 1016 deletions(-)(-83 net LOC,0new files).uv run --extra test python -m ruff check loopx/capabilities/issue_fix/pr_lifecycle.py loopx/capabilities/issue_fix/correction_settlement.py tests/capabilities/test_issue_fix_maintainer_correction_admission.py:All checks passed!.uv run --extra test python -m mypy(17 configured strict source files):Success: no issues found in 17 source files.node --experimental-strip-types --test tests/control_plane_ts/content_digest_single_owner.test.ts:17 passed, 0 failed(clears old-basetypescript-core (2/3)failure).uv run --extra test python examples/semantic-vocabulary-drift-smoke.py --advisory-git-diff origin/main:ok(andpytest -q tests/architecture/test_semantic_vocabulary_drift.py:124 passed in 25.36s).uv run --no-sync python examples/issue-fix-pr-lifecycle-smoke.py,examples/issue-fix-maintainer-correction-smoke.py,examples/issue-fix-workflow-contract-smoke.py: allok.pytest -q tests/capabilities/test_issue_fix*.py tests/capabilities/test_pr_wait*.py tests/canary/test_maintainability_ratchet.py tests/architecture/test_issue_fix*.py tests/architecture/test_semantic_vocabulary_drift.py:411issue-fix/pr_wait tests passed,13/14ratchet tests passed (plus124/124semantic drift passed withnode_moduleslinked ->548 passedexcluding1pre-existingorigin/main@6d7489f7e7failure intest_current_repository_debt_is_reviewed_without_line_count_pinscaused by_admitted_interaction_next_cli_actionsin untouchedloopx/control_plane/work_items/interaction_contract.py).pytest -q tests/test_cli_entrypoint.py -k "capability_hook or pr_wait or pr_lifecycle":6 passed, 294 deselected.pytest -q tests/architecture/test_source_session_registry_denial.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_issue_fix_maintainer_association_owner.py:73 passed,1pre-existingorigin/mainfailure (test_direct_project_registry_loaders_have_source_session_denialon untouchedloopx/presentation/goal_storage_api.py).uv run --no-sync loopx canary premerge --tier quick --from-git-diff --git-diff-base origin/main:ok: true,failures: 0,rfc_bilingual_diff: passed,advisory_failures: 1(advisory_inherited_failureon untouchedloopx/control_plane/work_items/interaction_contract.py::_admitted_interaction_next_cli_actions).loopx check --scan-path ...across all 4 changed files:errors: 0, warnings: 0(public boundary scan clean: 4 files).